<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>用户管理</title>
    <link rel='stylesheet' th:href="@{/webjars/bootstrap/4.2.1/css/bootstrap.min.css}" href='webjars/bootstrap/4.2.1/css/bootstrap.min.css'>
</head>
<body class="container">
<div th:insert="~{myfragment :: head1}"></div>
<br/>
<h1>用户列表</h1>
<br/><br/>
<div class="with:80%">
    <div class="form-group">
        <div class="col-sm-2 control-label">
            <a href="toAdd" th:href="@{/toAdd}" class="btn btn-info">添加</a>
        </div>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>#</th>
            <th>Name</th>
            <th>Age</th>
            <th>Edit</th>
            <th>Delete</th>
        </tr>
        </thead>
        <tbody>
        <tr  th:each="user : ${page}">
            <th scope="row" th:text="${user.id}">1</th>
            <td th:text="${user.name}">neo</td>
            <td th:text="${user.age}">6</td>
            <td><a th:href="@{'/toEdit/'+${user.id}}">edit</a></td>
            <td><a th:href="@{'/delete/'+${user.id}}">delete</a></td>
        </tr>
        </tbody>

    </table>

</div>
<div th:include="~{myfragment :: foot1}"></div>
</body>
</html>